import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Sql2Proto from '@/components/Sql2Proto'
import Dec from '@/components/Dec'
import Enc from '@/components/Enc'
import Json2Struct from '@/components/Json2Struct'
import FormatJson from '@/components/FormatJson'
import Md5 from '@/components/Md5'

Vue.use(Router)

export default new Router({
  routes: [
    {path: '/', name: 'Index', redirect: '/home/sql2proto'},
    {
      path: '/home', name: 'Home', component: Home,
      children: [
        { path: '/home/sql2proto', name: 'Sql2Proto', component: Sql2Proto },
        { path: '/home/json2struct', name: 'Json2Struct', component: Json2Struct },
        { path: '/home/formatjson', name: 'FormatJson', component: FormatJson },
        { path: '/home/md5', name: 'Md5', component: Md5 },
      ],
    },
  ]
})
